<!DOCTYPE html>
<html>

	<head>
		<% include meta.html %>
		<title>首页</title>
	</head>

	<body>

		<% include header.html %>

		<div class="banner">
			<div class="swiper-container">
				<div class="swiper-wrapper">
					<div class="swiper-slide"><img class="inline-b img-responsive" src="<%=base_url%>img/ad4.png" alt="" /></div>
					<div class="swiper-slide"><img class="inline-b img-responsive" src="<%=base_url%>img/ad4.png" alt="" /></div>
					<div class="swiper-slide"><img class="inline-b img-responsive" src="<%=base_url%>img/ad4.png" alt="" /></div>
				</div>
				<!-- 如果需要分页器 -->
				<div class="swiper-pagination"></div>
				<!-- 如果需要导航按钮 -->
				<div class="swiper-button-prev"></div>
				<div class="swiper-button-next"></div>
			</div>
		</div>
	
		<!--当前位置-->
		<div class="page-c">
			<p class="f-18 c-6e6d6d mt-12 mb-10">当前位置：新房买卖</p>
			<!-- <div class="search mt-20 mb-20">
				<span class="f-14 c-2c342f mr-30">
					区域：
					<span class="select">
						<select name="type">
							<option value="">新华区</option>
							<option value="">合租</option>
						</select>
					</span>
				</span>
				<span class="f-14 c-2c342f mr-30">	
					类型：
					<span class="select">
						<select name="type">
							<option value="">写字楼</option>
							<option value="">合租</option>
						</select>
					</span>
				</span>	
				<span class="f-14 c-2c342f mr-30">	
					户型：
					<span class="select">
						<select name="type">
							<option value="">三室</option>
							<option value="">合租</option>
						</select>
					</span>
				</span>	
				<span class="f-14 c-2c342f mr-30">
					售价：
					<span class="select">
						<select name="type">
							<option value="">300以上</option>
							<option value="">合租</option>
						</select>
					</span>
				</span>	
				<span class="f-14 c-2c342f mr-30">
					面积：
					<span class="select">
						<select name="type">
							<option value="">90-130</option>
							<option value="">合租</option>
						</select>
					</span>
				</span>	
				
			</div> -->
			<hr class="hr-line mt-10" />
		</div>
		
		
		<!--合租房源-->
		<div class="page-c mt-10 mb-20">
			

			<div class="list-mai">
			
				<ul class="overflow-h cl">
						<%if(list.length>0){%>
							<%for(var i=0,item;i<list.length;i++){%>
									<% item = list[i];%>		 
					<li class="pb-10 row">
							
						<div class="img">
								<a href="/mf/detail/<%=item.id%>">
								<%if(!!!item.thumbnail){%>
									<img class="fw-default" src="<%=base_url%>img/ali1.png" alt="" />
								<%}else{%>
									<img class="fw-default" src="<%=item.thumbnail%>" alt="" />		
								<%}%>
							</a>
						</div>
						<div>
							<h3 class="f-24 bold mb-15 c-2c342f"><%=item.title%></h3>
							<p class="f-18 c-2c342f lh-25 mb-15">位置：<%=item.addr%></p>
							<p class="f-18 c-2c342f lh-25 mb-15">均价：￥<%=item.price%>/㎡</p>
							<p class="f-18 c-2c342f lh-25 mb-15">建面：<%=item.mianji%>m²</p>
							<p class="f-18 c-2c342f lh-25 mb-15">新房顾问：<%=item.author%> </p>
							<p class="f-18 c-2c342f lh-25 mb-15">户型：<%=item.huxing%>室 </p>
						</div>
					</li>
					<%}%>
					<%}else{%>
					
					<%}%>
				</ul>
			</div>
			
			<!--分页-->
			<div class="page row space-around">
				<ul class="row" id="page">
				
				</ul>
			</div> 
			
		</div>

		<% include footer.html %>

		<% include js.html %>
		<script>
			var vm = new Vue({
				el: '.page-c',
				data: {
					level: {}
				},
				methods: {
					page: function () {
						var pageNo = $m.getParams('page');
						if (pageNo <= 0) {
							pageNo = 1;
						}
		
						if (pageNo > parseInt('<%=totalpage%>')) {
							pageNo = parseInt('<%=totalpage%>');
						}
		
						Page({
							num: parseInt('<%=totalpage%>'),	//页码数
							startnum: pageNo,				//指定页码
							elem: $('#page'),		//指定的元素
							callback: function (n) {	//回调函数
								console.log(n);
								location.href = '/mf/list?page='+n
							}
						});
					}
				},
				created: function () {
					this.page();
		
				},
				mounted: function () {
		
				},
				updated: function () {
		
				}
			});
		</script>
	</body>

</html>